import axios from 'axios'

const request = axios.create({
  baseURL: 'http://127.0.0.1:7001'
})

request.interceptors.request.use(
  function(config) {
    // Do something before request is sent
    config.headers.Authorization = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjIsImlhdCI6MTYwOTMzMzExNywiZXhwIjoxNjQwNDM3MTE3fQ.5RzWDIcfgb3SNZFZdF_U-GbuAUjx18ugkxRfhU8qz50'
    return config
  },
  function(error) {
    // Do something with request error
    return Promise.reject(error)
  }
)

export default request
